import sys
import pygame,setting
from charter import person
import game_function as gf
def run_game():
    pygame.init()
    ai_setting=setting.Setting()
    screen = pygame.display.set_mode((ai_setting.screen_width, ai_setting.screen_high))
    charter=person(ai_setting,screen)
    pygame.display.set_caption("我是fw")
    clock=pygame.time.Clock()
    while True:                  #游戏循环
        clock.tick(60)
        gf.check_event(charter)
        charter.gravity()
        charter.update()
        gf.update_screen(ai_setting,screen,charter)
run_game()